forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 345
[lldb][swift] Call FixDataAddress on task pointers before printing them #11061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
felipepiovezan
wants to merge
3,748
commits into
swiftlang:stable/20240725
from
felipepiovezan:felipe/call_fixptr_swift_formatter
Closed
[lldb][swift] Call FixDataAddress on task pointers before printing them #11061
felipepiovezan
wants to merge
3,748
commits into
swiftlang:stable/20240725
from
felipepiovezan:felipe/call_fixptr_swift_formatter
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ift-to-6.2 🍒[lldb][Commands] Fix memory find for Swift expressions
…n inferring OS versions (llvm#143817) (cherry picked from commit 9b67988)
In a thorny corner of the language C++ doesn't actually type check the return type of a function passed into a std::function argument. Here the type inference in the lambda resulted in a ChildInfo being returned where an llvm::Expected<ChildInfo> was expected, which through coincidence works very often, but not always, leading to a crash. rdar://153137542
[lldb] Add missing return type annotations
…_bp_filtering_release [lldb][swift] Disable breakpoint filtering by default
…/remove-inlined-format [lldb][Format] Display only the inlined Swift frame name in backtraces if available
…/use-common-pythonhome-to-6.2 🍒 [lldb] make lit use the same PYTHONHOME for building and testing (llvm#143183)
[lldb] Simplify formatter condition
[lldb] Fix test when running on macOS 26.0
…okens (llvm#142452) Sometimes, when a user writes invalid code, the minimization used for scanning can create a stream of tokens that is invalid at lex time. This patch protects against the case where there are valid (non-c++20) import directives discovered in the middle of an invalid `import` declaration. Mostly authored by: @akyrtzi resolves: rdar://152335844 (cherry picked from commit 897b030)
…ch's, NFCI (llvm#142161) (cherry picked from commit 883130e)
Currently when jitting expressions, LLDB scans the IR instructions of the `$__lldb_expr` and will insert a call to a utility function for each load/store instruction. The purpose of the utility funciton is to dereference the load/store operand. If that operand was an invalid pointer the utility function would trap and LLDB asks the IR checker whether it was responsible for the trap, in which case it prints out an error message saying the expression dereferenced an invalid pointer. This is a lot of setup for not much gain. In fact, creating/running this utility expression shows up as ~2% of the expression evaluation time (though we cache them for subsequent expressions). And the error message we get out of it is arguably less useful than if we hadn't instrumented the IR. It was also untested. Before: ``` (lldb) expr int a = *returns_invalid_ptr() error: Execution was interrupted, reason: Attempted to dereference an invalid pointer.. The process has been returned to the state before expression evaluation. ``` After: ``` (lldb) expr int a = *returns_invalid_ptr() error: Expression execution was interrupted: EXC_BAD_ACCESS (code=1, address=0x5). The process has been returned to the state before expression evaluation. ``` This patch removes this IR checker. (cherry picked from commit 0a7b0c8)
…argets/frames (llvm#144503) There's no need to create this utility function (and run it) for targets/frames that aren't Objective-C/Objective-C++. (cherry picked from commit 4ced29b)
…arget [clang] Fix missing target info specifier on Global Variable linkage computation
…computation A previous change (swiftlang#10555) added support for querying 'isWeakImported' to be parameterized on the enclosing target version to match 'CheckAvailability' and 'getAvailability'. We missed passing in this parameter in the Clang module code-gen when querying linkage for a global variable. This change adds the missing parameter and removes the default parameter from the query in order to avoid this kind of bug in the future. Resolves rdar://154677999
…k swift PR testing This test sometimes fails in swift PR testing with an assert in the remangler rdar://156138054
[lldb][test] disable TestSwiftFoundationTypeNotification.py to unblock swift PR testing
…e's Link Libraries (swiftlang#10994) (swiftlang#11008) This PR implements the C-APIs for a client can query a module's link libraries. rdar://154807137 (cherry picked from commit 708340e)
…/lldb/swift-mangling [Syntax Highlighting] Add name and parameters syntax highlighting in Swift backtraces
…y-forward-declaration [feature availability] Don't disallow annotating ObjC interfaces and protocols with features when there are unannotated forward declarations of them
…y-protocol [feature availability] Don't warn about unguarded uses of ObjC protocols adopted by interfaces
…ddress [lldb] Add an extra optional did_read_live_memory to Target::ReadMemory and [lldb] Implement LLDBMemoryReader::readRemoteAddressImpl
…ddress-6.2 [lldb] Add an extra optional did_read_live_memory to Target::ReadMemory and [lldb] Implement LLDBMemoryReader::readRemoteAddressImpl
…TestSwiftAsyncHiddenFrames [lldb] Disable TestSwiftAsyncHiddenFrames while it is investigated
These are pointers to heap addresses that may sometimes be tagged.
8f13a70
to
4f083f6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are pointers to heap addresses that may sometimes be tagged.